/*
 * @Description: 邮件API接口
 * @Author: QianLong
 * @Date: 2019-07-07 19:06:52
 * @LastEditors    : QianLong
 * @LastEditTime   : 2023-04-17 15:18:39
 */
import http from '@/utils/http/axios'

export function getServerList(params) {
  return http.request({
    url: '/push/server_list',
    method: 'GET',
    params
  })
}
export function getTplList(params) {
  return http.request({
    url: '/push/tpl_list',
    method: 'GET',
    params
  })
}
export function getTplCateList(params) {
  return http.request({
    url: '/push/tpl_cate_list',
    method: 'GET',
    params
  })
}
export function getLogList(params) {
  return http.request({
    url: '/push/send_log_list',
    method: 'GET',
    params
  })
}
export function getAllServerList(params) {
  return http.request({
    url: '/push/all_server_list',
    method: 'GET',
    params
  })
}
export function getAllTplList(params) {
  return http.request({
    url: '/push/all_tpl_list',
    method: 'GET',
    params
  })
}
export function getAllCateList(params) {
  return http.request({
    url: '/push/all_cate_list',
    method: 'GET',
    params
  })
}
export function getSendSetting(params) {
  return http.request({
    url: '/push/send_setting',
    method: 'GET',
    params
  })
}
export function editSendSetting(params) {
  return http.request(
    {
      url: '/push/send_setting',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delServerBatch(params) {
  return http.request(
    {
      url: '/push/del_server_batch',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function doSendPush(params) {
  return http.request(
    {
      url: '/push/send_push',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function resetPushWebhook(params) {
  return http.request(
    {
      url: '/push/reset_webhook_url',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delServerItem(params) {
  return http.request(
    {
      url: '/push/del_server',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delTplItem(params) {
  return http.request(
    {
      url: '/push/del_tpl',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delEmailLog(params) {
  return http.request(
    {
      url: '/push/del_push_log',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delLogAll(params) {
  return http.request(
    {
      url: '/push/del_log_all',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delEmailLogBatch(params) {
  return http.request(
    {
      url: '/push/del_push_log_batch',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function reSendEmailBatch(params) {
  return http.request(
    {
      url: '/push/resend_push_batch',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delTplCate(params) {
  return http.request(
    {
      url: '/push/del_tpl_cate',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editHookInfo(params) {
  return http.request(
    {
      url: '/push/edit_hook_info',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editServerInfo(params) {
  return http.request(
    {
      url: '/push/edit_server_info',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editTplCateInfo(params) {
  return http.request(
    {
      url: '/push/edit_tpl_cate_info',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function testServer(params) {
  return http.request(
    {
      url: '/push/test_server',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editTplInfo(params) {
  return http.request(
    {
      url: '/push/edit_tpl_info',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function allLogData(params) {
  return http.request(
    {
      url: '/push/all_data',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function getFromAds(params) {
  return http.request({
    url: '/push/all_push_data',
    method: 'GET',
    params
  })
}
export function getFromSingleEmail(params) {
  return http.request({
    url: '/push/single_push_data',
    method: 'GET',
    params
  })
}
